<template>
  <view class="app">
    <view class="back-btn mix-icon icon-xiangzuo" @click="navBack"></view>
    <view class="page-tip">{{ title }}</view>
    <view class="item-wrap">
      <view class="wrap-title">货物路线信息</view>
      <view class="item-panel">
        <view class="item row">
          <view class="item1 column">
            <image
              class="item-img"
              src="/static/zhuanhg.png"
              mode="aspectFit"
            ></image>
            <view class="item-line"></view>
            <image
              class="item-img"
              src="/static/xie2.png"
              mode="aspectFit"
            ></image>
          </view>
          <view class="item2 column">
            <view class="item21 item-title row">
              浙江省 <text class="item-tag"></text> 杭州市</view
            >
            <view class="item21 item-desc row">
              杭州市滨江区浦沿街道卓信物流园</view
            >
            <view class="item21 item-date row">
              <image
                class="date-icon"
                src="/static/riqi@2x.png"
                mode="scaleToFill"
              />
              今天 下午 12:00-18:00 可装</view
            >
            <view class="item21 item-line"></view>
            <view class="item21 item-title row">
              江苏省 <text class="item-tag"></text> 宿迁市</view
            >
            <view class="item21 item-desc row"> 宿迁市泗阳县淮海东路8号</view>
            <view class="item21 item-date row">
              <image
                class="date-icon"
                src="/static/riqi@2x.png"
                mode="scaleToFill"
              />
              明天 下午 12:00-18:00 可卸8号</view
            >
          </view>
        </view>
      </view>
    </view>
    <view class="item-wrap">
      <view class="wrap-title">货物信息</view>
      <view class="item-panel">
        <view class="item2 column">
          <view class="item31 item-title row"
            >货源编号 <text class="desc">YD22121114494818</text></view
          >
        </view>
      </view>
      <view class="item41 item-title row"
        >货物 <text class="desc">可口可乐 · 饮料 · 40吨 · 20</text></view
      >
      <view class="item41 item-line"></view>
      <view class="item41 item-title row"
        >车辆 <text class="desc">2.7/4.2/6.8米</text><text class="silver"></text
        ><text class="desc">高栏/厢车/平板</text></view
      >
    </view>
    <view class="item-wrap">
      <view class="wrap-title">服务要求</view>
      <view class="item-panel">
        <view class="item2 column">
          <view class="item51 item-title row">轻拿轻放，需要冷冻箱</view>
          <view class="item51 item-title row">轻拿轻放，需要冷冻箱</view>
        </view>
      </view>
    </view>
    <view class="item-wrap">
      <view class="wrap-title">货主信息</view>
      <view class="item61">
        <view class="item61-left">
          <image class="logo-icon" src="/static/driver@2x.png"></image>
        </view>
        <view class="item61-right">
          <view class="item61-title">张志伟</view>
          <view class="item61-info">
            <view class="item61-desc"
              >交易<text class="desc">2087次</text></view
            >
            <view class="item61-desc"
              >发货总量<text class="desc">8097吨</text></view
            >
          </view>
        </view>
      </view>
    </view>
    <view class="fixed-btn">
      <view class="price">￥2500<text class="tag">元/趟</text></view>
      <mix-button
        ref="confirmBtnNG"
        text="拒单"
        :isConfirm="false"
        class="btn-default"
        @onConfirm="showPopup('confirmModal')"
      ></mix-button>
      <mix-button
        ref="confirmBtnOK"
        text="接单"
        :isConfirm="false"
        style="width: 210rpx; margin-right: 30rpx"
        @onConfirm="onSave"
      ></mix-button>
    </view>
    <user-confirm
      ref="confirmModal"
      title="温馨提示"
      text="确认拒绝当前选择货源吗?"
      @onConfirm="onCancel"
    ></user-confirm>
  </view>
</template>

<script>
import userConfirm from "../../components/user-confirm/user-confirm.vue";
export default {
  components: {
    userConfirm,
  },
  data() {
    return {
      title: "货源列表",
    };
  },
  methods: {
    navBack() {
      uni.navigateBack();
    },
	onCancel() {
		
	},
    onSave() {
		
	},
  },
};
</script>

<style>
page {
  background: #f7f8f9;
}
</style>
<style scoped lang="scss">
.app {
  padding-top: 90rpx;
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-image: url("../../static/page_bg.png");
  background-repeat: no-repeat;
  background-size: 100% 600rpx;
}
.back-btn {
  position: absolute;
  left: 20rpx;
  top: calc(var(--status-bar-height) + 30rpx);
  z-index: 90;
  padding: 20rpx;
  font-size: 34rpx;
  color: white;
}
.page-tip {
  position: absolute;
  left: 50%;
  top: calc(var(--status-bar-height) + 44rpx);
  z-index: 90;
  margin-left: -80rpx;
  font-size: 34rpx;
  color: white;
  line-height: 34rpx;
}
.item-wrap {
  width: 700rpx;
  margin: 20rpx auto 0;
  padding: 30rpx;
  background: #fff;
  border-radius: 20rpx;
  .wrap-title {
    font-size: 18px;
    font-weight: bold;
    color: #222222;
    line-height: 18px;
    margin: 0rpx auto 30rpx auto;
  }
  .item-panel {
    position: relative;
    background: #f9fafb;
    // height: 320rpx;
    border-radius: 14rpx;
    padding: 20rpx;
    .date-icon {
      width: 30rpx;
      height: 30rpx;
      margin-right: 14rpx;
    }
    .item {
      align-items: start;
      .item1 {
        height: 200rpx;
        justify-content: space-between;
        align-items: center;
        .item-line {
          border-left: 1rpx dashed #979797;
          height: 80rpx;
          width: 1rpx;
        }
        .item-img {
          width: 46rpx;
          height: 46rpx;
        }
      }
      .item2 {
        margin-left: 28rpx;
        justify-content: space-between;
        width: 100%;
        .item21 {
          height: 46rpx;
          // margin: 5rpx auto;
          align-items: center;
        }
        .item-title {
          font-weight: bold;
        }
        .item-tag {
          display: inline-block;
          margin: auto 16rpx;
          width: 12rpx;
          height: 12rpx;
          border-radius: 12rpx;
          background-color: black;
        }
        .item-line {
          border-bottom: 1rpx solid #d8d8d8;
          width: 100%;
          height: 1rpx;
          margin: 10rpx auto;
        }
        .item-date {
          font-size: 26rpx;
          color: #666666;
        }
      }
    }
    .item31 {
      .desc {
        padding-left: 20rpx;
        font-weight: bold;
      }
    }
  }
  .item41 {
    color: #666;
    margin: 10rpx auto;
    &.item-line {
      width: 100%;
      height: 1rpx;
      border-bottom: 1px solid #d8d8d8;
    }
    .desc {
      color: #222;
      padding-left: 20rpx;
    }
    .silver {
      border-left: 1rpx solid #979797;
      height: 20rpx;
      width: 1rpx;
      margin-left: 20rpx;
    }
  }
  .item51 {
    margin: 5rpx 0;
  }
  .item61 {
    display: flex;
    .item61-left {
      width: 160rpx;
      .logo-icon {
        width: 120rpx;
        height: 120rpx;
      }
    }
    .item61-right {
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      margin: 14rpx 0;
      .item61-title {
        font-weight: bold;
      }
      .item61-info {
        display: flex;
        justify-content: space-around;
        .item61-desc {
          color: #666;
          margin-right: 30rpx;
          .desc {
            margin-left: 10rpx;
            color: #222;
          }
        }
      }
    }
  }
}

.fixed-btn {
  position: absolute;
  left: 0;
  bottom: 0vh;
  z-index: 1;
  width: 100%;
  height: 140rpx;
  font-size: 24rpx;
  font-weight: bold;
  color: #999;
  background-color: #fff;
  display: flex;
  flex-wrap: wrap;
  // justify-content: space-around;
  align-items: center;
  flex: 1;
  .price {
    color: #f55348;
    margin: auto 25rpx;
    wdith: 200rpx;
    font-size: 44rpx;
    font-weight: bold;
    .tag {
      padding-left: 4rpx;
      font-size: 26rpx;
    }
  }
}
.btn-default {
  width: 210rpx;
  background-color: white;
  border: 1px solid #f75248;
  color: #f5473b;
  &:after {
    background: linear-gradient(151deg, white 0%, rgb(240, 236, 236) 100%);
  }
}
</style>
